﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;

namespace net.diadrasis.dnn.jsImageGallery.Components
{
    public class cImage : IHydratable
    {
        public int id { get; set; }

        public string file { get; set; }

        public string desc { get; set; }

        public string link { get; set; }

        public int modID { get; set; }

        public int imgsecID { get; set; }

        public void Fill(System.Data.IDataReader dr)
        {            
            id = Null.SetNullInteger(dr["imgID"]);
            file = Null.SetNullString(dr["imgFile"]);
            desc = Null.SetNullString(dr["imgDesc"]);
            link = Null.SetNullString(dr["imgLink"]);
            modID = Null.SetNullInteger(dr["moduleID"]);
            imgsecID = Null.SetNullInteger(dr["imgsecID"]);
        }

        public int KeyID
        {
            get
            {
                return id;
            }
            set
            {
                id = value;
            }
        }
    }
}
            
   